Hi Ray,
You are correct but that is considered a feature :}
You can even re-boot the PC and KFLOP will maintain its state. This way the destinations, encoder positions, IO, Internal variables are all maintained which is what I think you would most often want.
The only solution we currently offer is to force a known state if you wish to do so. I think it might be good practice to set everything in the board that you are using and not rely on default values anyway.
Regards
TK
Group: DynoMotion |
Message: 2984 |
From: himykabibble |
Date: 1/8/2012 |
Subject: Re: KMotion_dotNet Startup Initialization |
Tom,
So there is literally no way to reinitialize the board short of a power cycle? If so, how do I know *what* to re-initialize to "fake" a reboot? Some things are obvious, but I suspect many others are much less so....
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> You are correct but that is considered a feature :}
> Â
> You can even re-boot the PC and KFLOP will maintain its state. This way the destinations, encoder positions, IO, Internal variables are all maintained which is what I think you would most often want.
> Â
> The only solution we currently offer is to force a known state if you wish to do so. I think it might be good practice to set everything in the board that you are using and not rely on default values anyway.
> Â
> Regards
> TK
> Â
> Â
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, January 7, 2012 5:27 PM
> Subject: [DynoMotion] KMotion_dotNet Startup Initialization
>
>
> Â
> I have much of my CNC app working, but I'm having some startup problems. It appears to me that the board is retaining state between sessions, if I don't power it down. I can see this most easily by loading a G-code file, starting it running, then hitting FeedHold. If I then exit my app, and re-start it, it comes up in FeedHold. I can see no way to force a complete re-initialization of the board. Obviously I could force all the necessary states on start-up, but it seems to me the board NEEDS to be put into a known state when an app starts, or, at a minimum the app needs to have a way of forcing the board into a known state more efficiently than by setting them all individually in the app.
>
> What am I missing?
>
> Regards,
> Ray L.
>
|
|
Group: DynoMotion |
Message: 2987 |
From: bradodarb |
Date: 1/8/2012 |
Subject: Re: KMotion_dotNet Startup Initialization |
Ray, I think Tom is right on this one. Your intial state requirements may be different than mine, so the calling application needs to be responsible for the initialzation.
-Brad Murry
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Ray,
> Â
> You are correct but that is considered a feature :}
> Â
> You can even re-boot the PC and KFLOP will maintain its state. This way the destinations, encoder positions, IO, Internal variables are all maintained which is what I think you would most often want.
> Â
> The only solution we currently offer is to force a known state if you wish to do so. I think it might be good practice to set everything in the board that you are using and not rely on default values anyway.
> Â
> Regards
> TK
> Â
> Â
>
> From: himykabibble <jagboy@...>
> To: DynoMotion@yahoogroups.com
> Sent: Saturday, January 7, 2012 5:27 PM
> Subject: [DynoMotion] KMotion_dotNet Startup Initialization
>
>
> Â
> I have much of my CNC app working, but I'm having some startup problems. It appears to me that the board is retaining state between sessions, if I don't power it down. I can see this most easily by loading a G-code file, starting it running, then hitting FeedHold. If I then exit my app, and re-start it, it comes up in FeedHold. I can see no way to force a complete re-initialization of the board. Obviously I could force all the necessary states on start-up, but it seems to me the board NEEDS to be put into a known state when an app starts, or, at a minimum the app needs to have a way of forcing the board into a known state more efficiently than by setting them all individually in the app.
>
> What am I missing?
>
> Regards,
> Ray L.
>
|
|
Group: DynoMotion |
Message: 2995 |
From: himykabibble |
Date: 1/8/2012 |
Subject: Re: KMotion_dotNet Startup Initialization |
Brad,
I can see the logic, but in 30 years of doing embedded system development, I can't think of a single system I've ever worked on that didn't have some programmatic means of forcing the hardware into a known consistent state, as a starting point for any unique configuration the application may want to do. It can obviously be worked around, but I need to know EXACTLY what NEEDS to be re-initialized to ensure there won't be corner cases where I end up in an unexpected state. And what do I do if the DSP crashes - I'm sure it's possible for that to happen, however rare. As I said, my board is normally locked inside sealed enclosure, so cycling power is really not convenient.
Regards,
Ray L.
--- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@...> wrote:
>
>
> Ray, I think Tom is right on this one. Your intial state requirements may be different than mine, so the calling application needs to be responsible for the initialzation.
>
> -Brad Murry
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Ray,
> > Â
> > You are correct but that is considered a feature :}
> > Â
> > You can even re-boot the PC and KFLOP will maintain its state. This way the destinations, encoder positions, IO, Internal variables are all maintained which is what I think you would most often want.
> > Â
> > The only solution we currently offer is to force a known state if you wish to do so. I think it might be good practice to set everything in the board that you are using and not rely on default values anyway.
> > Â
> > Regards
> > TK
> > Â
> > Â
> >
> > From: himykabibble <jagboy@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Saturday, January 7, 2012 5:27 PM
> > Subject: [DynoMotion] KMotion_dotNet Startup Initialization
> >
> >
> > Â
> > I have much of my CNC app working, but I'm having some startup problems. It appears to me that the board is retaining state between sessions, if I don't power it down. I can see this most easily by loading a G-code file, starting it running, then hitting FeedHold. If I then exit my app, and re-start it, it comes up in FeedHold. I can see no way to force a complete re-initialization of the board. Obviously I could force all the necessary states on start-up, but it seems to me the board NEEDS to be put into a known state when an app starts, or, at a minimum the app needs to have a way of forcing the board into a known state more efficiently than by setting them all individually in the app.
> >
> > What am I missing?
> >
> > Regards,
> > Ray L.
> >
>
|
|
Group: DynoMotion |
Message: 2998 |
From: bradodarb |
Date: 1/8/2012 |
Subject: Re: KMotion_dotNet Startup Initialization |
Hello Ray,
Fair enough, I am not saying the feature would not be nice.
Once you start burning in userprograms that execute on start you need to start discovering state anyways....
Maybe an ideal situation is another space for initialization user program that come s with a default setting to put the device in a 'known' state but can be re burned for people that want to have a custom init state.
What do you think guys?
The init program space would not need to loop, so it would not need to affect the deterministic RT.
-Brad Murry
--- In DynoMotion@yahoogroups.com, "himykabibble" <jagboy@...> wrote:
>
> Brad,
>
> I can see the logic, but in 30 years of doing embedded system development, I can't think of a single system I've ever worked on that didn't have some programmatic means of forcing the hardware into a known consistent state, as a starting point for any unique configuration the application may want to do. It can obviously be worked around, but I need to know EXACTLY what NEEDS to be re-initialized to ensure there won't be corner cases where I end up in an unexpected state. And what do I do if the DSP crashes - I'm sure it's possible for that to happen, however rare. As I said, my board is normally locked inside sealed enclosure, so cycling power is really not convenient.
>
> Regards,
> Ray L.
>
> --- In DynoMotion@yahoogroups.com, "bradodarb" <bradodarb@> wrote:
> >
> >
> > Ray, I think Tom is right on this one. Your intial state requirements may be different than mine, so the calling application needs to be responsible for the initialzation.
> >
> > -Brad Murry
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Ray,
> > > Â
> > > You are correct but that is considered a feature :}
> > > Â
> > > You can even re-boot the PC and KFLOP will maintain its state. This way the destinations, encoder positions, IO, Internal variables are all maintained which is what I think you would most often want.
> > > Â
> > > The only solution we currently offer is to force a known state if you wish to do so. I think it might be good practice to set everything in the board that you are using and not rely on default values anyway.
> > > Â
> > > Regards
> > > TK
> > > Â
> > > Â
> > >
> > > From: himykabibble <jagboy@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Saturday, January 7, 2012 5:27 PM
> > > Subject: [DynoMotion] KMotion_dotNet Startup Initialization
> > >
> > >
> > > Â
> > > I have much of my CNC app working, but I'm having some startup problems. It appears to me that the board is retaining state between sessions, if I don't power it down. I can see this most easily by loading a G-code file, starting it running, then hitting FeedHold. If I then exit my app, and re-start it, it comes up in FeedHold. I can see no way to force a complete re-initialization of the board. Obviously I could force all the necessary states on start-up, but it seems to me the board NEEDS to be put into a known state when an app starts, or, at a minimum the app needs to have a way of forcing the board into a known state more efficiently than by setting them all individually in the app.
> > >
> > > What am I missing?
> > >
> > > Regards,
> > > Ray L.
> > >
> >
>
|
|
Group: DynoMotion |
Message: 3000 |
From: Tom Kerekes |
Date: 1/8/2012 |
Subject: Re: KMotion_dotNet Startup Initialization |
Ray,
I haven't ever had a need to do this. But it should be:
#1 Initialize all Axis Parameters (Init.c normally does this)
#2 All IO bits as inputs and Cleared (will be low if changed to output)
#3 Al Persist Variables Cleared
#4 Define the CoordSystem
#5 KFLOP LEDS turned on
#6 All PWMs Disabled
#7 Encoder's noise filter and mux settings
FPGAW(ENC_NOISE_FILTER_ADD)=ENC_NOISE_FILTER_DEFAULT_VAL; //(also Mux to Aux1=0)
#8 Step/Dir Pulse Gen Global configuration
FPGA(STEP_PULSE_LENGTH_ADD)=STEP_PULSE_LENGTH_DEFAULT;
#9 All Threads Killed
#10 StopImmediate (Feedhold) Cleared
Hmmm more than I thought
TK
| | | |